<template>
    <el-form :model="form" label-width="77px"  @submit.native.prevent  @keyup.enter.native="search">
        <el-row :gutter="20">
            <el-col :md="5" :sm="5" :xs="24">
                <el-form-item label="时间:">
                    <el-date-picker v-model="form.time" type="date" placeholder="请选择日期">
                    </el-date-picker>
                </el-form-item>
            </el-col>
            <el-col :md="5" :sm="5" :xs="24">
                <el-form-item label="渠道筛选:" label-width="90px">
                    <el-select v-model="form.status" placeholder="请选择渠道" style="width: 100%;">
                        <el-option :value="0" label="冻结" />
                        <el-option :value="1" label="正常" />
                    </el-select>
                </el-form-item>
            </el-col>
            <el-col :md="5" :sm="5" :xs="24">
                <el-form-item label="充值源:">
                    <el-date-picker v-model="form.resorce" type="date" placeholder="请输入充值源">
                    </el-date-picker>
                </el-form-item>
            </el-col>
            <el-col :md="5" :sm="5" :xs="24">
                <div class="ele-form-actions">
                    <el-button type="primary" @click="search">搜索</el-button>
                    <el-button type="info" plain @click="reset">重置</el-button>
                </div>
            </el-col>
        </el-row>
    </el-form>
</template>

<script>
export default {
    data() {
        return {
            form: {
                status: undefined,
                time: undefined,
                resorce: undefined,
            }
        };
    },
    methods: {
        search() {
            this.$emit("search", this.form);
        },
        reset() {
            this.form = {
                time: undefined,
                status: undefined,
                resorce: undefined,
            };
            this.$emit("search", this.form);
        }
    }
};
</script>